package com.exp.sys.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import org.hibernate.validator.constraints.NotBlank;
import org.hibernate.validator.constraints.NotEmpty;

import com.exp.base.entity.BaseEntity;

@Entity
@Table(name="sys_admin")
public class Admin extends BaseEntity{
	
	private String email="";

    private boolean enabled;

    private boolean locked;

    private Date lockedDate;

    private Date loginDate;

    private int loginfailureCount;

    private String loginip="";
    @NotBlank
    private String name="";
    
    private String password="";
    @NotBlank
    private String username="";
    
	private String photoId="";

    
    public Admin() {
	}
    
    
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public boolean isEnabled() {
		return enabled;
	}
	public void setEnabled(boolean enabled) {
		this.enabled = enabled;
	}
	public boolean isLocked() {
		return locked;
	}
	public void setLocked(boolean locked) {
		this.locked = locked;
	}
	public Date getLockedDate() {
		return lockedDate;
	}
	public void setLockedDate(Date lockedDate) {
		this.lockedDate = lockedDate;
	}
	public Date getLoginDate() {
		return loginDate;
	}
	public void setLoginDate(Date loginDate) {
		this.loginDate = loginDate;
	}
	public int getLoginfailureCount() {
		return loginfailureCount;
	}
	public void setLoginfailureCount(int loginfailureCount) {
		this.loginfailureCount = loginfailureCount;
	}
	public String getLoginip() {
		return loginip;
	}
	public void setLoginip(String loginip) {
		this.loginip = loginip;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	
	public String getPhotoId() {
		return photoId;
	}
	
	public void setPhotoId(String photoId) {
		this.photoId = photoId;
	}


	@Override
	public String toString() {
		return "Admin [email=" + email + ", enabled=" + enabled + ", locked="
				+ locked + ", lockedDate=" + lockedDate + ", loginDate="
				+ loginDate + ", loginfailureCount=" + loginfailureCount
				+ ", loginip=" + loginip + ", name=" + name + ", password="
				+ password + ", username=" + username + "]";
	}


    
 }